package com.atguigu.boot04.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author:朱思博
 * @date:2021/5/8-{14:49} Web原生组件注入（Servlet、Filter、Listener）
 */
// 发送/my 请求，就来到这个Servlet处理
@WebServlet(urlPatterns = "/my")
public class MyServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().write("6 servlet");
    }
}
